import request from '@/utils/request'

//统一字典下拉框查询
export function adminDict(params) {
  return request({
      url: `common/v1/adminDict`,
      params
  })
}
// 查询发行管理列表
export function inventoryList(query) {
  return request({
    url: '/equity/inventory/list',
    method: 'get',
    params: query
  })
}
// 新增权益库存
export function addInventory(data) {
  return request({
    url: '/equity/inventory',
    method: 'post',
    data: data
  })
}
// 修改权益库存
export function updateInventory(data) {
  return request({
    url: '/equity/inventory',
    method: 'put',
    data: data
  })
}
// 获取权益库存信息
export function getInventory(id) {
  return request({
    url: '/equity/inventory/' + id,
    method: 'get'
  })
}
// 保存权益库存券码
export function inventoryCouponCodeSave(data) {
  return request({
    url: '/equity/inventory/coupon/code/save',
    method: 'put',
    data: data
  })
}
// 券码明细列表
export function inventoryCouponCodeList(query) {
  return request({
    url: '/equity/inventory/coupon/code/list',
    method: 'get',
    params: query
  })
}
// 查询商家店铺下拉框
export function shopSelect(query) {
  return request({
    url: '/common/v1/shop/select',
    method: 'get',
    params: query
  })
}
// 系统生成权益添加库存
export function couponCodeAdd(data) {
  return request({
    url: '/equity/inventory/coupon/code/auto',
    method: 'post',
    data
  })
}
